/*--------------------------------------------------------------
 * File: demo16.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 判断三个数中最大的数
 * Version 0.1
 * Date 2022-01-01 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
// #include <stdio.h>
// int main(int argc, char const *argv[])
// {
//     double n1,n2,n3;
//     printf("请输入三个数：");
//     scanf("%lf %lf %lf",&n1,&n2,&n3);

//     if(n1 > n2 && n1 > n3)
//         printf("最大数n1 = %lf\n",n1);
//     if(n2 > n1 && n2 > n3)
//         printf("最大数n2 = %lf\n",n2);
//     if(n3 > n2 && n3 > n1)
//         printf("最大数n3 = %lf\n",n3);   

//     return 0;
// }

#include <stdio.h>
int main(int argc, char const *argv[])
{
    double n1,n2,n3,max;
    printf("请输入三个数：");
    scanf("%lf %lf %lf",&n1,&n2,&n3);

    if(n1 > n2)
    {
        max = n1;
    }
    else
    {
        max = n2;
    }

    if(max > n3)
        printf("最大数 = %lf\n",max);
    else
        printf("最大数 = %lf\n",n3);  

    return 0;
}

